home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Graphics / TVPaint / Rexx / demo.rx < prev    next >
Encoding:
Text File  |  1995-11-07  |  8.9 KB  |  420 lines

  1. /*    Param none    */
  2.  
  3. options results
  4.  
  5. address 'rexx_TVPaint'
  6.  
  7.     tv_SetDrawMode    Color
  8.     tv_AliasOn
  9.     tv_StencilOff
  10.     tv_DensityOff
  11.     tv_CycleOff    
  12.     tv_RangeV
  13.     tv_UpdateUndo
  14.     tv_loadfont    "topaz.font" 8
  15.     tv_SetAPen 255 255 255
  16.     tv_SetBPen 0 0 0 255
  17.     tv_clear
  18.  
  19.     tv_GetWidth
  20.     x=(result-640)%2
  21.     
  22.     tv_GetHeight
  23.     y=(result-512)%2
  24.     y=y-10
  25.  
  26. /* uno: design */
  27.  
  28.     tv_text    x+30 y+100 'Design'
  29.     tv_text    x+30 y+115 'Dessin'
  30.  
  31.     tv_Pen 0
  32.     tv_line x+95 y+95 x+105 y+105
  33.     tv_line x+105 y+95 x+95 y+105
  34.     tv_circle x+100 y+100 80
  35.     tv_line x+100 y+20 x+100 y+180
  36.     tv_spline x+100 y+20 x+140 y+100 x+100 y+180
  37.  
  38.     tv_line x+103 y+22 x+110 y+21
  39.     tv_line x+106 y+24 x+118 y+22
  40.     tv_line x+109 y+27 x+123 y+24
  41.     tv_line x+112 y+30 x+129 y+26
  42.     tv_line x+115 y+33 x+134 y+28
  43.     tv_line x+118 y+36 x+139 y+30
  44.     tv_line x+119 y+38 x+143 y+33
  45.     tv_line x+121 y+41 x+147 y+36
  46.     tv_line x+123 y+43 x+152 y+39
  47.     tv_line x+125 y+47 x+155 y+42
  48.     tv_line x+128 y+50 x+161 y+47
  49.     tv_line x+130 y+54 x+163 y+51
  50.     tv_line x+132 y+59 x+166 y+55
  51.     tv_line x+134 y+63 x+169 y+59
  52.     tv_line x+136 y+67 x+171 y+63
  53.     tv_line x+136 y+71 x+173 y+68
  54.     tv_line x+138 y+76 x+175 y+73
  55.     tv_line x+140 y+81 x+140 y+81
  56.     tv_line x+177 y+77 x+139 y+82
  57.     tv_line x+179 y+82 x+139 y+86
  58.     tv_line x+178 y+86 x+138 y+92
  59.     tv_line x+179 y+91 x+138 y+97
  60.     tv_line x+180 y+96 x+140 y+100
  61.     tv_line x+180 y+100 x+139 y+102
  62.     tv_line x+179 y+106 x+140 y+105
  63.     tv_line x+179 y+112 x+139 y+110
  64.     tv_line x+178 y+117 x+139 y+114
  65.     tv_line x+176 y+122 x+138 y+117
  66.     tv_line x+175 y+128 x+138 y+121
  67.     tv_line x+172 y+133 x+135 y+125
  68.     tv_line x+170 y+139 x+135 y+130
  69.     tv_line x+167 y+143 x+134 y+134
  70.     tv_line x+164 y+147 x+133 y+139
  71.     tv_line x+161 y+152 x+131 y+142
  72.     tv_line x+157 y+157 x+129 y+145
  73.     tv_line x+153 y+159 x+127 y+149
  74.     tv_line x+149 y+163 x+126 y+152
  75.     tv_line x+145 y+166 x+123 y+155
  76.     tv_line x+140 y+169 x+122 y+158
  77.     tv_line x+138 y+171 x+119 y+162
  78.     tv_line x+133 y+173 x+116 y+165
  79.     tv_line x+128 y+175 x+114 y+168
  80.     tv_line x+122 y+176 x+111 y+169
  81.     tv_line x+116 y+177 x+109 y+173
  82.     tv_line x+111 y+178 x+107 y+175
  83.     tv_line x+106 y+178 x+101 y+177
  84.  
  85.  
  86.  
  87.  
  88. /* due: color range */
  89.  
  90.     tv_cycleON
  91.     tv_SetColor 36
  92.     tv_RectFill x+210 y+10 x+390 y+190 x+310 y+180
  93.  
  94.     tv_SetColor 240
  95.     tv_AreaCircle x+300 y+100 80 0 0 1
  96.     tv_AreaCircle x+300 y+100 77 x+310 y+180
  97.     tv_cycleOFF
  98.  
  99.     tv_SetAPen 255 255 255 
  100.     tv_text    x+230 y+100 'Ranges'
  101.     tv_text    x+230 y+115 'Dégradés' 
  102.  
  103.  
  104.  
  105. /* tre: smear */
  106.  
  107.     tv_cycleON
  108.     tv_AliasOFF
  109.     tv_AreaCircle x+500 y+100 80 x+480 y+180
  110.     tv_cycleOFF
  111.  
  112.     tv_AliasON
  113.     tv_SetDrawMode Smear
  114.     tv_Pen 4
  115.     do j=1 to 180 by 25
  116.         do i=1 to 180 by 7
  117.             tv_line x+420+i y+j x+410+i y+j+25
  118.         end
  119.     end
  120.     tv_SetDrawMode Color
  121.  
  122.     tv_SetAPen 255 255 255
  123.     tv_text    x+430 y+100 0 'Paint'
  124.     tv_text    x+430 y+115 0 'Peinture'
  125.  
  126.  
  127. /* quattro: density */
  128.  
  129.     tv_DensityLineX 0 255 255 0
  130.     tv_densityON
  131.     tv_yclear
  132.     tv_xcenter
  133.     tv_SetAPen 0 0 255
  134.     tv_AreaCircle x+100 y+280 75 x+70 y+250
  135.     tv_SetAPen 255 255 0
  136.     tv_AreaCircle x+160 y+280 30 x+150 y+270
  137.     tv_SetAPen 255 0 0
  138.     tv_AreaCircle x+100 y+320 18 x+94 y+314
  139.     tv_SetAPen 255 255 255
  140.     tv_AreaCircle x+150 y+330 12 x+146 y+326
  141.     tv_densityOFF
  142.  
  143.     tv_SetAPen 255 255 255
  144.     tv_text    x+30 y+280 'Density'
  145.     tv_text    x+30 y+295 'Densité'
  146.  
  147.  
  148. /*    cinque: paint */
  149.  
  150.  
  151.     tv_SetAPen 255 255 255
  152.     tv_text    x+260 y+330 'Airbrush'
  153.     tv_text    x+260 y+345 'Aérographe'
  154.  
  155.     tv_AirPower 10
  156.     tv_AirPen 10
  157.     tv_SetAPen 0 0 200
  158.     dx=x-70
  159.     dy=y-65
  160.     do i=1 to 2
  161.  
  162.         tv_Line dx+317 dy+301 dx+298 dy+417
  163.         /* the P loop */
  164.         tv_Line dx+297 dy+325 dx+292 dy+323
  165.         tv_Line dx+292 dy+323 dx+286 dy+317
  166.         tv_Line dx+286 dy+317 dx+282 dy+309
  167.         tv_Line dx+282 dy+309 dx+281 dy+302
  168.         tv_Line dx+281 dy+302 dx+284 dy+296
  169.         tv_Line dx+284 dy+296 dx+290 dy+291
  170.         tv_Line dx+290 dy+291 dx+299 dy+288
  171.         tv_Line dx+299 dy+288 dx+310 dy+286
  172.         tv_Line dx+310 dy+286 dx+326 dy+286
  173.         tv_Line dx+326 dy+286 dx+338 dy+289
  174.         tv_Line dx+338 dy+289 dx+346 dy+294
  175.         tv_Line dx+346 dy+294 dx+353 dy+301
  176.         tv_Line dx+353 dy+301 dx+356 dy+309
  177.         tv_Line dx+356 dy+309 dx+356 dy+318
  178.         tv_Line dx+356 dy+318 dx+353 dy+324
  179.         tv_Line dx+353 dy+324 dx+348 dy+330
  180.         tv_Line dx+348 dy+330 dx+343 dy+335
  181.         tv_Line dx+343 dy+335 dx+337 dy+338
  182.         tv_Line dx+337 dy+338 dx+330 dy+340
  183.         tv_Line dx+330 dy+340 dx+321 dy+341
  184.         
  185.         /* draw aint */
  186.         tv_Line dx+345 dy+359 dx+342 dy+358
  187.         tv_Line dx+342 dy+358 dx+337 dy+360
  188.         tv_Line dx+337 dy+360 dx+332 dy+366
  189.         tv_Line dx+332 dy+366 dx+330 dy+372
  190.         tv_Line dx+330 dy+372 dx+331 dy+377
  191.         tv_Line dx+331 dy+377 dx+333 dy+377
  192.         tv_Line dx+333 dy+377 dx+341 dy+372
  193.         tv_Line dx+341 dy+372 dx+345 dy+365
  194.         tv_Line dx+345 dy+365 dx+350 dy+355
  195.         tv_Line dx+350 dy+355 dx+344 dy+373
  196.         tv_Line dx+344 dy+373 dx+346 dy+377
  197.         tv_Line dx+346 dy+377 dx+349 dy+377
  198.         tv_Line dx+349 dy+377 dx+362 dy+356
  199.         tv_Line dx+362 dy+356 dx+362 dy+377
  200.         tv_Line dx+362 dy+377 dx+378 dy+361
  201.         tv_Line dx+378 dy+361 dx+378 dy+378
  202.         tv_Line dx+378 dy+378 dx+394 dy+361
  203.         tv_Line dx+394 dy+361 dx+395 dy+374
  204.         tv_Line dx+395 dy+374 dx+397 dy+378
  205.         tv_Line dx+397 dy+378 dx+399 dy+378
  206.         tv_Line dx+399 dy+378 dx+406 dy+369
  207.         tv_Line dx+406 dy+369 dx+414 dy+350
  208.         tv_Line dx+414 dy+350 dx+416 dy+329
  209.         tv_Line dx+416 dy+329 dx+416 dy+364
  210.         tv_Line dx+416 dy+364 dx+419 dy+375
  211.         tv_Line dx+419 dy+375 dx+425 dy+380
  212.         tv_Line dx+425 dy+380 dx+429 dy+380
  213.         tv_Line dx+429 dy+380 dx+434 dy+377
  214.     
  215.         /* the point on the i */
  216.         tv_Line dx+360 dy+344 dx+365 dy+335
  217.     
  218.         /* the t bar */
  219.         tv_Line dx+388 dy+340 dx+458 dy+340
  220.  
  221.         tv_AirPower 25
  222.         tv_AirPen 10
  223.         tv_SetAPen 255 255 255
  224.         dx=x-65
  225.         dy=y-75
  226.     end
  227.  
  228. /* 6: colorize */
  229.  
  230.     tv_SetAPen 100 100 100
  231.     tv_RectFill x+410 y+190 x+590 y+370 x+510 y+180
  232.     tv_SetAPen 200 200 200
  233.     tv_AreaCircle x+500 y+280 80 x+510 y+360
  234.  
  235.     tv_SetAPen 255 255 255
  236.     tv_text    x+430 y+280 'Colorize'
  237.     tv_text    x+430 y+295 'Colorisation' 
  238.  
  239.     tv_SetDrawMode Colorize
  240.  
  241.     tv_SetAPen 255 255 0
  242.     tv_RectFill x+435 y+190 x+461 y+370
  243.     tv_SetAPen 0 255 255
  244.     tv_RectFill x+461 y+190 x+487 y+370
  245.     tv_SetAPen 0 255 0
  246.     tv_RectFill x+487 y+190 x+513 y+370
  247.     tv_SetAPen 255 0 255
  248.     tv_RectFill x+513 y+190 x+539 y+370
  249.     tv_SetAPen 255 0 0
  250.     tv_RectFill x+539 y+190 x+565 y+370
  251.     tv_SetAPen 0 0 255
  252.     tv_RectFill x+565 y+190 x+590 y+370
  253.  
  254.     tv_SetDrawMode Color
  255.  
  256.  
  257.  
  258. /* sept: wrapping */
  259.  
  260.     tv_densityON
  261.     tv_SetAPen 0 0 255
  262.     tv_AreaCircle x+100 y+450 70 x+70 y+420
  263.     tv_densityOFF
  264.  
  265.     tv_cycleON
  266.     tv_wrapx 1
  267.     tv_wrapy 1
  268.     tv_brush x+220 y+200 x+360 y+340
  269.     tv_AreaCircle x+100 y+450 70 x+70 y+420
  270.     tv_wrapx 0
  271.     tv_wrapy 0
  272.     tv_RangeV
  273.     tv_brush 0 0 1 1
  274.     tv_cycleOFF
  275.  
  276.     tv_SetAPen 255 255 255
  277.     tv_densityON
  278.     tv_AreaCircle x+100 y+450 70 x+70 y+420
  279.     tv_densityOFF
  280.  
  281.     tv_SetDrawMode Colorize
  282.     tv_SetAPen 255 128 0
  283.     tv_AreaCircle x+100 y+450 70
  284.  
  285.     tv_SetDrawMode Color
  286.     tv_SetAPen 255 255 255
  287.     tv_text    x+125 y+400 'Wrapping'
  288.     tv_text    x+125 y+415 'Placage'
  289.  
  290.  
  291. /* ui: lines */
  292.  
  293.     tv_Pen 0
  294.     width=180
  295.     height=150
  296.     dx=210+x
  297.     dy=370+y
  298.     va=5
  299.     vb=3
  300.     vc=3
  301.     vd=6
  302.     a=random(0,width,time('S'))
  303.     b=random(0,height,time('S')+a)
  304.     c=random(0,width,time('S')+b)
  305.     d=random(0,height,time('S')+c)
  306.  
  307.     r=random(0,255,time('S'))
  308.     g=random(0,255,time('S'))
  309.     blue=random(0,255,time('S'))
  310.     wr=10
  311.     wg=12
  312.     wb=8
  313.     do z=1 to 200
  314.         r=r+wr
  315.         if (r>255) | (r<0) then
  316.         do
  317.             wr=-wr
  318.             r=r+wr
  319.         end
  320.         g=g+wg
  321.         if (g>255) | (g<0) then
  322.         do
  323.             wg=-wg
  324.             g=g+wg
  325.         end
  326.         blue=blue+wb
  327.         if (blue>255) | (blue<0) then
  328.         do
  329.             wb=-wb
  330.             blue=blue+wb
  331.         end
  332.  
  333.         tv_SetApen r g blue
  334.  
  335.         a=a+va
  336.         if (a>width) | (a<0) then
  337.         do
  338.             va=-va
  339.             a=a+va
  340.         end
  341.         b=b+vb
  342.         if (b>height) | (b<0) then
  343.         do
  344.             vb=-vb
  345.             b=b+vb
  346.         end
  347.         c=c+vc
  348.         if (c>width) | (c<0) then
  349.         do
  350.             vc=-vc
  351.             c=c+vc
  352.         end
  353.         d=d+vd
  354.         if (d>height) | (d<0) then
  355.         do
  356.             vd=-vd
  357.             d=d+vd
  358.         end
  359.         tv_Line dx+a dy+b dx+c dy+d
  360.         
  361.     end
  362.  
  363.     tv_SetAPen 255 255 255
  364.     tv_text    x+320 y+430 'ARexx'
  365.     tv_text    x+320 y+445 'Interface'
  366.  
  367.  
  368. /* etc */
  369.  
  370.     tv_SetAPen 255 255 255
  371.     tv_line 5 0 0 5
  372.     tv_line 5 1 0 6
  373.     tv_smoothedge 3
  374.     tv_brushcut 0 0 6 6 1
  375.  
  376.     tv_line x+440 y+496 x+450 y+487
  377.     tv_line x+450 y+487 x+455 y+478
  378.     tv_line x+455 y+478 x+463 y+477
  379.     tv_line x+463 y+477 x+469 y+472
  380.     tv_line x+469 y+472 x+470 y+462
  381.     tv_line x+470 y+462 x+466 y+457
  382.     tv_line x+466 y+457 x+459 y+456
  383.     tv_line x+459 y+456 x+454 y+461
  384.     tv_line x+454 y+461 x+451 y+468
  385.     tv_line x+451 y+468 x+452 y+476
  386.     tv_line x+452 y+476 x+457 y+485
  387.     tv_line x+457 y+485 x+462 y+491
  388.     tv_line x+462 y+491 x+472 y+494
  389.     tv_line x+472 y+494 x+480 y+492
  390.     tv_line x+480 y+492 x+485 y+483
  391.     tv_line x+485 y+483 x+488 y+465
  392.     tv_line x+488 y+465 x+489 y+441
  393.     tv_line x+489 y+441 x+489 y+416
  394.     tv_line x+490 y+415 x+493 y+482
  395.     tv_line x+493 y+482 x+497 y+489
  396.     tv_line x+497 y+489 x+502 y+493
  397.     tv_line x+502 y+493 x+509 y+492
  398.     tv_line x+509 y+492 x+515 y+487
  399.     tv_line x+469 y+434 x+528 y+432
  400.     tv_line x+533 y+460 x+532 y+458
  401.     tv_line x+532 y+458 x+527 y+454
  402.     tv_line x+527 y+454 x+519 y+454
  403.     tv_line x+519 y+454 x+515 y+459
  404.     tv_line x+515 y+459 x+512 y+470
  405.     tv_line x+512 y+470 x+514 y+479
  406.     tv_line x+514 y+479 x+517 y+488
  407.     tv_line x+517 y+488 x+522 y+493
  408.     tv_line x+522 y+493 x+529 y+492
  409.     tv_line x+529 y+492 x+535 y+487
  410.     tv_line x+535 y+487 x+539 y+482
  411.     tv_line x+554 y+485 x+552 y+493
  412.     tv_line x+565 y+485 x+564 y+493
  413.     tv_line x+578 y+483 x+577 y+491
  414.     
  415.     tv_smoothedge 0
  416.     tv_Pen 0
  417.     
  418. /* die ende */
  419.  
  420.